<?php

namespace app\AdminData;

use think\Db;

class ProxyShopData extends Base
{
    public function addProxyShop($name, $pwd, $time)
    {
        return Db::table('drh_proxy_shop_account')
            ->insertGetId([
                'account_name' => $name,
                'account_pwd' => $pwd,
                'create_time' => $time
            ]);
    }

    public function addProxyShopInfo($user_id, $img, $address, $business_license, $proxy_name)
    {
        return Db::table('drh_proxy_shop_info')
            ->insertGetId([
                'user_id' => $user_id,
                'img' => json_encode($img),
                'address' => $address,
                'business_license' => $business_license,
                'proxy_name' => $proxy_name
            ]);
    }
}